3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
QuickDraw 3D provides routines that you can use to create and manage illumination shaders. QuickDraw 3D supplies two types of illumination shaders, Lambert illumination shaders and Phong illumination shaders.
You can use the Q3LambertIllumination_New function to create a new illumination shader that provides Lambert illumination.
TQ3ShaderObject Q3LambertIllumination_New (void);
The Q3LambertIllumination_New function returns, as its function result, a new illumination shader that implements a Lambert illumination model. See "Illumination Models" for information on the Lambert illumination algorithm.
You can use the Q3PhongIllumination_New function to create a new illumination shader that provides Phong illumination.
TQ3ShaderObject Q3PhongIllumination_New (void);
The Q3PhongIllumination_New function returns, as its function result, a new illumination shader that implements a Phong illumination model. See "Illumination Models" for information on the Phong illumination algorithm.
You can use the Q3NULLIllumination_New function to create a new null illumination shader.
TQ3ShaderObject Q3NULLIllumination_New (void);
You can use the Q3IlluminationShader_GetType function to get the type of an illumination shader.
TQ3ObjectType Q3IlluminationShader_GetType (
TQ3ShaderObject shader);
The Q3IlluminationShader_GetType function returns, as its function result, the type of the illumination shader specified by the shader parameter. The types of illumination shaders currently supported by QuickDraw 3D are defined by these constants:
kQ3IlluminationTypeLambert
kQ3IlluminationTypePhong
kQ3IlluminationTypeNULL
If the specified illumination shader is invalid or is not one of these types, Q3IlluminationShader_GetType returns the value kQ3ObjectTypeInvalid .
Previous | QD3D Book | Overview | Chapter Contents | Next |